import http from "./http"

export default {
  // 获取用户银行卡列表
  get(userId) {
    return http.get(`/app-api/pay/withdrawal/cards?userId=${userId}`)
  },
  /**
   * 添加银行卡
   */
  add(data) {
    return http.post("/app-api/pay/withdrawal/addBankCard", data)
  },
  /**
   * 删除银行卡
   */
  del(cardId) {
    return http.post(`/app-api/pay/withdrawal/cards/delete?cardId=${cardId}`)
  },
  /**
   * 修改银行卡
   */
  update(data) {
    return http.post("/app-api/pay/withdrawal/updateBankCard", data)
  },
  /**
   * 设置默认银行卡
   */
  set_defailt(data) {
    return http.put("/app-api/pay/withdrawal/cards/default", data)
  },
}
